
<template>
  <div>
    <ul>
      <li v-for="items in name" :key="items">{{ items }}</li>
    </ul>
    <button @click="btn">走一走</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      name: ["帅哥", "美女", "程序员"],
    };
  },
  methods: {
    btn() {
      this.name.push(this.name[0]);
      this.name.splice(0, 1);
    },
  },
};
</script>

<style>
</style>